package com.custom.ipc.sender;

import javax.portlet.ActionResponse;
import javax.portlet.RenderRequest;
import javax.xml.namespace.QName;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.portlet.bind.annotation.ActionMapping;
import org.springframework.web.portlet.bind.annotation.RenderMapping;

@Controller
@RequestMapping("VIEW")
public class senderController {
	
	@ActionMapping("sender")
	public void sendAction(SessionStatus sessionStatus, ActionResponse actionResponse){
		QName qName = new QName("http://liferay.com/events", "ipc.sender");
		actionResponse.setEvent(qName, "hi hello");
		sessionStatus.setComplete();
		
		
	}
	@RenderMapping
	public String render(Model model, SessionStatus status, RenderRequest request)
	{
		return "sender";
	}	

}
